<template>
  <div class="banner-image" style="background:url(https://hmhr-1308572366.cos.ap-nanjing.myqcloud.com/backg.png) center center no-repeat;background-size:cover; height:1080px" data-v-1318f4e8="">
    <el-main>
      <div style="margin-top: 15px;" class="Searchbox">
        <el-input v-model="input" placeholder="请输入内容">
          <el-button
            slot="append"
            icon="el-icon-search"
            style="height:80px"
            @click="btnsearch"
          />
        </el-input>
      </div>
    </el-main>
  </div>
</template>

<script>
import eventBus from '@/eventBus'
import { screenClassificationList } from '@/api/classification'
export default {
  data() {
    return {
      activeIndex: '/index',
      input: '',
      searchlist: {
        address_contains: ''
      }
    }
  },
  methods: {
    async btnsearch() {
      this.searchlist.address_contains = this.input
      console.log(this.searchlist)
      eventBus.$emit('transportData', '/classification')
      const { data } = await screenClassificationList(this.searchlist)
      this.$router.push({
        name: 'classification',
        params: {
          data
        }
      })
      console.log(data)
    }
  }
}
</script>

<style  lang="less" scoped>
.Searchbox{
  line-height: 1080px;
  width: 60%;
  margin: auto;
}
::v-deep .el-input__inner{
    height: 80px;
  }
</style>
